package com.sihai.ehr.model.biz;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.sihai.core.BaseEntity;
import com.sihai.ehr.model.sys.Organization;
import com.sihai.ehr.model.sys.SalaryLinkedEnum;

/**
 * 加班费管理
 * 
 * @author henry
 * 
 */
@Entity
public class SalaryOvertime extends BaseEntity<Long> {
	// id,org_id,title,work_day,usually_overtime,weekend_overtime,holidays_overtime,linked_data_type,cost_base,...
	/**
	 * 
	 */
	private static final long serialVersionUID = -3493321722571888607L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;
	/** 组织结构ID */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "organization_id")
	private Organization organization;
	/** 方案名称 */
	private String title;
	/** 工作天数 */
	private Float workDay;
	/** 平时加班倍数 */
	private Float usuallyOvertime;
	/** 周末加班倍数 */
	private Float weekendOvertime;
	/** 节假日加班 */
	private Float holidaysOvertime;

	/** 挂钩数据类型　 */
	@Enumerated(EnumType.STRING)
	private SalaryLinkedEnum linkedDataType;

	/** 挂钩数据值*/
	private Float costBase;

	@Override
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Organization getOrganization() {
		return organization;
	}

	public void setOrganization(Organization organization) {
		this.organization = organization;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Float getWorkDay() {
		return workDay;
	}

	public void setWorkDay(Float workDay) {
		this.workDay = workDay;
	}

	public Float getUsuallyOvertime() {
		return usuallyOvertime;
	}

	public void setUsuallyOvertime(Float usuallyOvertime) {
		this.usuallyOvertime = usuallyOvertime;
	}

	public Float getWeekendOvertime() {
		return weekendOvertime;
	}

	public void setWeekendOvertime(Float weekendOvertime) {
		this.weekendOvertime = weekendOvertime;
	}

	public Float getHolidaysOvertime() {
		return holidaysOvertime;
	}

	public void setHolidaysOvertime(Float holidaysOvertime) {
		this.holidaysOvertime = holidaysOvertime;
	}

	public SalaryLinkedEnum getLinkedDataType() {
		return linkedDataType;
	}

	public void setLinkedDataType(SalaryLinkedEnum linkedDataType) {
		this.linkedDataType = linkedDataType;
	}

	public Float getCostBase() {
		return costBase;
	}

	public void setCostBase(Float costBase) {
		this.costBase = costBase;
	}
}
